#ifndef INCLUDE_Ccamdet
#define INCLUDE_Ccamdet
#include "MultiThreadingCP.h"
#include <sys/time.h>
#define MAX_MARK 15 // max MARK quantity
#define CP_ERR_CAMNOTOPEN -1 // can't open the camera
struct MarkInfo
{
	int id; // the mark id. range:0 ~ 1023
	float x; // the camera position x
	float y; // the camera position y
	float z; // the camera position z
	float spin_x; // the camera x-axis spin angle
	float spin_y; // the camera y-axis spin angle
	float spin_z; // the camera z-axis spin angle
};

typedef struct _CamPos
{
	int isDetected; // Is detected the mark? 0 for false, 1 for true
	struct timeval updateTime; // last update time
	struct timeval lastDetTime; // last deteceted mark time
	int quantity; // how many mark is detected
	int height; // the deteceted height by US100
	struct MarkInfo markInfo[MAX_MARK];
	int err_no; // record error information, no error is 0 
	int stopRem; // when this value set to 1, the detect function will stop the cycle
}CamPos;
//void updatePosition(CamPos * camPos, CP_MUTEXLOCK * mlock);
#endif